<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <input type="text" id="text">
    <span>秀儿</span>
</div>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script>
    $(function () {
        var obj = {};
        Object.defineProperty(obj, "text", {
            get: function () {
                return obj
            },
            set: function (val) {
                $("#text").val(val);
                $("span").text(val)
            }
        });
        $("#text").keyup(function (e) {
            obj.text = this.value;
        })
    });
</script>
</body>
</html>